using Microsoft.AspNetCore.Mvc.RazorPages;
using simple_demo_of_DI.Interfaces;

namespace simple_demo_of_DI.Pages;

public class Index2Model : PageModel
{
    private readonly IMyDependency _myDependency;

    public Index2Model(IMyDependency myDependency)
    {
        _myDependency = myDependency;
    }

    public void OnGet()
    {
        _myDependency.WriteMessage("Index2Model.OnGet");
    }
}